package com.tdkj.model.bbs;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * EjfShortMsg entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ejf_short_msg", catalog = "west")
public class EjfShortMsg implements java.io.Serializable {

	// Fields

	private Integer msgId;
	private EjfUser ejfUser;
	private String title;
	private String message;
	private String fromUser;
	private String outflag;
	private String state;
	private Timestamp createTime;
	private Timestamp updateTime;

	// Constructors

	/** default constructor */
	public EjfShortMsg() {
	}

	/** minimal constructor */
	public EjfShortMsg(EjfUser ejfUser, String title, String fromUser, Timestamp updateTime) {
		this.ejfUser = ejfUser;
		this.title = title;
		this.fromUser = fromUser;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public EjfShortMsg(EjfUser ejfUser, String title, String message, String fromUser, String outflag, String state, Timestamp createTime, Timestamp updateTime) {
		this.ejfUser = ejfUser;
		this.title = title;
		this.message = message;
		this.fromUser = fromUser;
		this.outflag = outflag;
		this.state = state;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "msgID", unique = true, nullable = false)
	public Integer getMsgId() {
		return this.msgId;
	}

	public void setMsgId(Integer msgId) {
		this.msgId = msgId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userID", nullable = false)
	public EjfUser getEjfUser() {
		return this.ejfUser;
	}

	public void setEjfUser(EjfUser ejfUser) {
		this.ejfUser = ejfUser;
	}

	@Column(name = "title", nullable = false, length = 100)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "message", length = 200)
	public String getMessage() {
		return this.message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Column(name = "fromUser", nullable = false, length = 15)
	public String getFromUser() {
		return this.fromUser;
	}

	public void setFromUser(String fromUser) {
		this.fromUser = fromUser;
	}

	@Column(name = "outflag", length = 1)
	public String getOutflag() {
		return this.outflag;
	}

	public void setOutflag(String outflag) {
		this.outflag = outflag;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable = false, length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

}